<?php

$benefit = new Benefit(getInput("id"));

$startDate = strtotime(ParseDateTimeToEn(getInput("startDateTime")));
$endDate = strtotime(ParseDateTimeToEn(getInput("endDateTime")));

$_REQUEST["startDateTime"] = $startDate;
$_REQUEST["endDateTime"] = $endDate;


if($benefit->insertFieldsFromRequest()){	
	logSuccess(langEcho("benefit:save:success"));
	echoJsonResponse(true, WWWROOT . "admin/benefits.php");
} else {	
	//logError(langEcho("benefit:save:error"));
	echoJsonResponse(false, "", langEcho("benefit:save:error"));
}

?>